import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import set from '@dfeidao/atom-web/local/set';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
export default async function a004(fd: IFeidaoAiBrowserComponent, args: Event) {
	// todo 睁眼闭眼
	const target = args.currentTarget as HTMLElement;
	const pwd = fd.data.node.querySelector<HTMLInputElement>('[id="user_pwd"]');
	const flag = get(fd, 'flag') || 'hide';
	if (flag === "hide") {
		pwd.type = "text";
		set_node_cls(target, 'icon-icon-test1', false);
		set_node_cls(target, 'icon-xianshi', true);
		set(fd, 'flag', 'show');

	}
	if (flag === "show") {
		pwd.type = "password";
		set_node_cls(target, 'icon-xianshi', false);
		set_node_cls(target, 'icon-icon-test1', true);
		set(fd, 'flag', 'hide');

	}


}
